package com.ruoyi.system.api;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.api.factory.RemoteKingdeeFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.system.api.domain.EmpResponse;

import java.util.List;

@FeignClient(contextId = "remoteKingdeeService", value = ServiceNameConstants.TQL_KINGDEE, fallbackFactory = RemoteKingdeeFallbackFactory.class)
public interface RemoteKingdeeService {

    /**
     * 门店采购入库单
     *
     * @param approveDate 审核日期
     * @return 结果
     */
    @PostMapping(value = "/kingdee/saveMaterialIncase")
    void saveMaterialIncase(@RequestParam("approveDate") String approveDate);

    /**
     * 分布式调入单据
     *
     * @param approveDate 审核日期
     * @return 结果
     */
    @PostMapping(value = "/kingdee/saveMaterialTransferin")
    void saveMaterialTransferin(@RequestParam("approveDate") String approveDate);


    /**
     * 分布式调出单据
     *
     * @param approveDate 审核日期
     * @return 结果
     */
    @PostMapping(value = "/kingdee/saveMaterialTransferout")
    void saveMaterialTransferout(@RequestParam("approveDate") String approveDate);

    @GetMapping(value = "/kingdee/getEmpByIdCard")
    R<List<EmpResponse>> getEmpByIdCard(@RequestParam("idcard") String idcard);


    @GetMapping(value = "/kingdee/saveStapByStapcode")
    void saveStapByStapcode(@RequestParam("stapCode") String stapCode);
}
